#ifndef _I_API_BUFFER_H_
#define _I_API_BUFFER_H_

#include "../cuCommon/cuTypes.h"

#include "E_api_Enum.h"
#include "S_api_Struct.h"

#include "../interface/I_api_Resource.h"

class I_api_Device;

class I_api_Buffer : public I_api_Resource
{
	friend class I_api_Device;

protected:
	S_api_BufferDesc m_Desc;

	I_api_Buffer(const S_api_BufferDesc *pDesc, 
							 const S_api_Subresource_Data *pInitialData,
							 const I_api_Device *pDevice) :
		I_api_Resource(E_api_Resource_Dimension_Buffer, pDevice)
	{
		m_Desc = *pDesc;
	} 

public:
	virtual					~I_api_Buffer(){}

	virtual void		GetDesc(S_api_BufferDesc * pDesc) = 0;
	virtual bool		Map(E_api_Map MapType, int32 MapFlags, void **ppData) = 0;
  virtual void		Unmap(void) = 0;

	virtual void *	Get(void)=0;
};

#endif